Skip to content

Conversation

sandersn
Copy link
Member

  1. convertToArray is a duplicate of arrayFrom
  2. inferFromParameterTypes delegates immediately to inferFromTypes
  3. One usage of arrayFrom instantiated a whole iterator only to take the
    first element, which is the same as calling next.

1. convertToArray is a duplicate of arrayFrom
2. inferFromParameterTypes delegates immediately to inferFromTypes
3. One usage of arrayFrom instantiated a whole iterator only to take the
first element, which is the same as calling `next`.
@sandersn
Copy link
Member Author

Note that I considered getting rid of arrayFrom in favour of iteration-based map/filter utilities, but the places that it's used don't look performance sensitive. They either run once per compilation (command line parsing, etc), during interactive use (getAllPossiblePropertiesOfType), or during error reporting (spelling suggestions)

@sandersn sandersn merged commit 48f4408 into master Jun 30, 2017
@sandersn sandersn deleted the dedupe-some-utility-code branch June 30, 2017 16:47
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants